package com.wuyou.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 刘雷雨
 * @since 2022-09-29
 */
@TableName("tb_adv_pay_log")
@ApiModel(value = "AdvPayLog对象", description = "")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Builder
public class AdvPayLogDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("支付主键id")
    @TableId(value = "adv_pay_id", type = IdType.AUTO)
    private Long advPayId;

    @ApiModelProperty("实付金额")
    private BigDecimal totalPrice;

    @ApiModelProperty("订单付款时间")
    private LocalDateTime payTime;

    @ApiModelProperty("订单修改时间")
    private String updateTime;

    @ApiModelProperty("广告主键ID")
    private Long advertisingId;

    @ApiModelProperty("用户ID")
    private Long userId;

    @ApiModelProperty("订单来源( 0 : 支付宝 , 1 : 微信 ,2 : 现金 )")
    private Integer orderFrom;

    @ApiModelProperty("交易订单号")
    private String orderNum;

    @ApiModelProperty("支付宝流水号")
    private String tradeNo;

    @ApiModelProperty("订单状态(0 :未支付 1: 已支付)")
    private Integer status;

    @ApiModelProperty("订单名称")
    private String orderName = "汤臣一品";

    @ApiModelProperty("订单描述")
    private String orderDesc;

    public AdvPayLogDTO(String orderNum, BigDecimal totalPrice, String orderDesc) {
        this.totalPrice = totalPrice;
        this.orderNum = orderNum;
        this.orderDesc = orderDesc;
    }
}
